<%@ page import="com.edu.imau.FixedParking.Fixed" %>
<%@ page import="com.edu.imau.ParkingDao" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>角色信息管理界面</title>
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">
    <!-- Bootstrap core CSS -->
    <link href="bootstrap-3.4.1/css/bootstrap.min.css" rel="stylesheet">
    <!-- Custom styles for this template -->
    <link href="navbar-fixed-top/navbar-fixed-top.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/bs/dt-1.13.1/datatables.min.css"/>
</head>
<body>
<form class="form-inline" action="FixedAdd">
    <input type="hidden" name="fixed_id" value="${fixed.fixed_id}">
    <div class="form-group">
        <label class="sr-only" style="width: 120px">车主姓名</label>
        <input type="text" class="form-control" name="fixed_name" id="fixed_name" placeholder="车主姓名" style="width: 250px"value="${fixed.fixed_name}">
    </div>
    <div class="form-group">
        <label class="sr-only" style="width: 120px">车主年龄</label>
        <input type="text" class="form-control" name="fixed_age" id="fixed_age" placeholder="车主年龄" style="width: 250px" value="${fixed.fixed_age}">
    </div><div class="form-group">
    <label class="sr-only" style="width: 50px" >车型号</label>
    <input type="text" class="form-control" name="fixed_brand" id="fixed_brand" placeholder="车型号" style="width: 250px"value="${fixed.fixed_brand}">
</div><div class="form-group">
    <label class="sr-only" style="width: 120px">车牌号</label>
    <input type="text" class="form-control" name="fixed_cnumber" id="fixed_cnumber" placeholder="车牌号" style="width: 250px"value="${fixed.fixed_cnumber}">
</div><div class="form-group">
    <label class="sr-only" style="width: 120px">车位编号</label>
    <input type="text" class="form-control" name="fixed_pnumber" id="fixed_pnumber" placeholder="车位编号" style="width: 250px"value="${fixed.fixed_pnumber}">
</div><div class="form-group">
    <label class="sr-only" style="width: 120px">停车状态</label>
    <input type="text" class="form-control" name="fixed_state" id="fixed_state" placeholder="停车状态" style="width: 250px"value="${fixed.fixed_state}">
</div>
    <button type="submit" class="btn btn-default" href="Fixed.jsp">确定</button>
</form>
<hr>
<!-- Main component for a primary marketing message or call to action -->
<table id="example" class="table table-bordered table-hover">
    <thead>
    <th>序号</th>
    <th>车主姓名</th>
    <th>车主年龄</th>
    <th>车型号</th>
    <th>车牌号</th>
    <th>车位编号</th>
    <th>停车状态</th>
    <th>操作</th>
    </thead>
    <tbody>
    <%Object list = request.getAttribute("data2");%>
    <%for(Fixed fixed:new ParkingDao().getFixedAll()){%>
    <tr>
        <td><%= fixed.getFixed_id() %></td>
        <td><%= fixed.getFixed_name() %></td>
        <td><%= fixed.getFixed_age() %></td>
        <td><%= fixed.getFixed_brand() %></td>
        <td><%= fixed.getFixed_cnumber() %></td>
        <td><%= fixed.getFixed_pnumber() %></td>
        <td><%= fixed.getFixed_state() %></td>
        <td>
            <a class="btn btn-warning" href="FixedUpdate?fixed_id=<%= fixed.getFixed_id()%>" role="button">修改</a>
            <a class="btn btn-danger" href="FixedDelete?fixed_id=<%= fixed.getFixed_id()%>" role="button">删除</a>

        </td>
    </tr>
    <%}%>
    </tbody>
</table>
</body>
<script src="https://code.jquery.com/jquery-1.12.4.min.js" integrity="sha384-nvAa0+6Qg9clwYCGGPpDQLVpLNn0fRaROjHqs13t4Ggj3Ez50XnGQqc/r8MhnRDZ" crossorigin="anonymous"></script>
<script type="text/javascript" src="https://cdn.datatables.net/v/bs/dt-1.13.1/datatables.min.js"></script>
<script>
    $(document).ready(function () {
        $('#example').DataTable();
    });
</script>
</html>
